---
layout: default
---
<div class="post-content well" style="word-break:break-all;">
<article class="content">
    <div class="post">{{ content }}</div>
    <hr />
    {% include license.html %}
</article>
{% include share-page.html %}
<hr />

{% assign hasSimilar = '' %}
{% for post in site.posts  %}
    {% assign postHasSimilar = false %}
    {% for tag in post.categories %}
        {% for thisTag in page.categories %}
            {% if postHasSimilar == false and hasSimilar.size < 6 and post != page and tag == thisTag %}
                {% if hasSimilar.size == 0 %}
                <div class="panel-body">
                <h4>相关文章</h4>
                <ul>
                {% endif %}
                <li class="relatedPost">
                    <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
                    {% if post.categories %}
                        <small>({% for category in post.categories %}<a href="{{ site.baseurl }}/categories.html#{{ category }}">{{ category }}</a>{% if forloop.last == false %}, {% endif %}{% endfor %})</small>
                    {% endif %}
                </li>
                {% capture hasSimilar %}{{ hasSimilar }}*{% endcapture %}
                {% assign postHasSimilar = true %}
            {% endif %}
        {% endfor %}
    {% endfor %}
{% endfor %}
{% if hasSimilar.size > 0 %}
    </ul>
    </div>
{% endif %}

<div class="PageNavigation">
    {% if page.previous.url %}
        <a class="prev pull-left" href="{{ site.baseurl }}{{ page.previous.url }}">&laquo; {{ page.previous.title }}</a>
    {% endif %}
    {% if page.next.url %}
        <a class="next pull-right" href="{{ site.baseurl }}{{ page.next.url }}">{{ page.next.title }} &raquo;</a>
    {% endif %}
</div>

{% include comment.html %}
</div>

<script src="https://cdn.bootcss.com/jquery/1.9.0/jquery.min.js"></script>
<script src="https://coolshell.cn/wp-content/themes/inove/js/jquery.bpopup-0.8.0.min.js"></script>
 
<script type="text/javascript">
;(function($) {
    $(function() {
        var url=document.referrer;
        if ( url && url.search("http://")>-1) {
            var refurl =  url.match(/:\/\/(.[^/]+)/)[1];
            if(refurl.indexOf("baidu.com")>-1){
                $('#nobaidu_dlg').bPopup();
            }
        }
    });
 
})(jQuery);
</script>
 
<div id="nobaidu_dlg" style="background-color:#fff; border-radius:15px;color:#000;display:none;padding:20px;min-width:450px;min-height:180px;">
    <img src="https://coolshell.cn/wp-content/themes/inove/img/nobaidu.jpg" align="left">
     <p style="margin-left:200px;margin-top: 20px; line-height: 30px;">
     检测到你还在使用百度这个搜索引擎，<br/>
     做为一个程序员，这是一种自暴自弃！<br/>
     <br/>
     </p>
     <p align="center" style="margin-top:20px;">
     <b><a href="https://coolshell.cn/articles/7186.html">作环保的程序员，从不用百度开始！</a></b>
     </p>
</div>